<?php


namespace  app\index\model;

use think\Db;
use think\Model;
use think\Session;

class  Admin {

	    public  function   us($id){

         //https://gitee.com/shuaijin/Thinkphp-teach-2.git
	    


             $data=Db::query("select   *,a.id as a_id ,a.name as a_name , b.id as b_id , b.name as b_name from
               csad_production as a left join csad_prod_member as b on a.id=b.productid  where a.id=$id ");             

  var_dump(Session::get('name'));

               return $data;


	    }





     public function  insert(){


              $data=['tagid'=>'9999','name'=>'11111111'];

              $rt=['1111111','222222222'];



        //  $sql=Db::table("csad_production")->fetchSql()->insert($data);


          $sql=Db::query(" INSERT INTO `csad_production` (`tagid` , `name`) VALUES ('9993391' , '11111111') ");


           Session::set('name','000000000');



           var_dump(Session::get('name'));
        



    
     	return ;


     }















}
















?>